package com.yycx.module.bus.provider.handler.haiying.order;

import com.yycx.common.base.entity.EntityMap;
import com.yycx.common.base.utils.FlymeUtils;
import com.yycx.common.mybatis.interceptor.GetInterceptor;
import com.yycx.common.mybatis.model.ResultBody;
import com.yycx.common.mybatis.query.CriteriaQuery;
import com.yycx.module.bus.provider.service.hy.BusHyorderSendinfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.regex.Pattern;


/**
 * 海鹰购销合同情信息
 *
 * @author zyf
 */
@Component
public class HyOrderGxhtGetHandler implements GetInterceptor {

    @Autowired
    private BusHyorderSendinfoService hyorderSendinfoService;

    Pattern pattern = Pattern.compile("(?<province>[^省]+省)(?<city>[^市]+市)(?<district>[^区]+区)");

    @Override
    public ResultBody validate(CriteriaQuery cq, EntityMap params) {
        return ResultBody.ok();
    }

    @Override
    public void prepare(CriteriaQuery cq, EntityMap entityMap) {

    }

    @Override
    public void complete(CriteriaQuery cq, EntityMap map) {
        Long orderId = map.getLong("orderId");
        String customAddress = map.get("customAddress");
        if (FlymeUtils.isNotEmpty(customAddress)) {

        }
    }
}
